<?php

namespace app\admin\controller;


class System extends Base
{
    // 系统设置
    public function setting()
    {
        if(request()->isAjax()){
            $data = [
                'id' => input('post.id'),
                'webname' => input('post.webname'),
                'copyright' => input('post.copyright'),
            ];
            $result = model('System')->set($data);
            if ($result == 1){
                $this->success('设置成功');
            }else{
                $this->error($result);
            }
        }


        $setting_info = model('System')->find();
        $this->assign('settingInfo', $setting_info);
        return view();
    }
}
